# 设置Flutter环境变量指向阿里云镜像

# 设置临时环境变量（当前会话有效）
$env:PUB_HOSTED_URL="https://mirrors.aliyun.com/dart-pub"
$env:FLUTTER_STORAGE_BASE_URL="https://mirrors.aliyun.com/flutter"

Write-Host "已设置Flutter环境变量指向阿里云镜像：" -ForegroundColor Green
Write-Host "PUB_HOSTED_URL = $env:PUB_HOSTED_URL" -ForegroundColor Cyan
Write-Host "FLUTTER_STORAGE_BASE_URL = $env:FLUTTER_STORAGE_BASE_URL" -ForegroundColor Cyan
Write-Host ""
Write-Host "提示：这些设置仅在当前终端会话中有效。如需永久设置，请将这些环境变量添加到系统环境变量中。" -ForegroundColor Yellow
Write-Host ""
Write-Host "现在您可以尝试运行以下命令：" -ForegroundColor Green
Write-Host "flutter clean" -ForegroundColor Cyan
Write-Host "flutter pub get" -ForegroundColor Cyan
Write-Host "flutter build apk --debug" -ForegroundColor Cyan